Skip to content

fix: handle no-op case-W-22406465#156

Merged
jfeingold35 merged 2 commits into
mainfrom
sl/W-22406465
May 11, 2026
Merged

fix: handle no-op case-W-22406465#156
jfeingold35 merged 2 commits into
mainfrom
sl/W-22406465

Conversation

@soridalac
Copy link
Copy Markdown
Contributor

Add git diff --cached --quiet check before the commit. If nothing is staged, the step exits 0 cleanly and skip the commit and push.

@W-22406465@

Comment thread .github/workflows/publishTypedoc.yml Outdated
run: |
cd docs
git add .
git diff --cached --quiet && echo "No docs changes to publish" && exit 0
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When there are changes, git diff --quiet will return a non-zero exit code, and I believe the way it's done here will crash the job. I think you'll need to combine this line with the next one to create something more like this instead:

git diff --cached --quiet || git commit -m "docs: publishing gh-pages [skip ci]" --no-verify

@jfeingold35 jfeingold35 merged commit 3a3a1ca into main May 11, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants